home *** CD-ROM | disk | FTP | other *** search
-
- CLIMAX (release four)
-
- For those who have used CLImax in the version released on Fish disk 429 (release
- three), here is a quick summary of how this version differs from that one:
- - It no longer requires ConMan. You can specify an alternative console
- handler (such as NEWCON: or GMC:) on the command line or with a tooltype.
- - Command line options now need a dash before the letter(s).
- - There are new options for productivity mode, single bitplane, smart
- refresh under 2.0, and starting up with the window inactive and the
- screen behind other screens.
- - There are now separate Workbench tooltypes for each of these options.
- - You can specify a single command which CLImax will exit after running,
- thus enabling you to put any text-based program on its own custom screen
- in the background. You can even run this command on a file argument
- passed by the Workbench. It can optionally wait for the user to press
- return before exiting, after running this command.
- - It's pure now. You can make it resident.
-
- Have you ever wished your CLI window had 25 lines of 80 characters, just like
- a good old fashioned non-windowing computer? The answer is here: CLImax by
- Paul Kienitz. It creates a custom screen with a borderless backdrop CLI / Shell
- window. It can run one command in this window or create an interactive session.
-
- To create an interactive Shell window, just type "CLImax" at a shell prompt, as
- you would type "NewShell". Or double click on the CLImax workbench icon. There
- are a number of options you can use to adjust the result:
-
- If you wish to use an alternative console handler instead of CON:, you can put
- the name of it on the command line (example: "CLImax NEWCON:"), or use the
- Workbench's "Info" menu option to add a ToolType named HANDLER (example:
- "HANDLER=GMC:"). CLImax works with the AmigaDOS 1.x and 2.x versions of CON:,
- with NEWCON:, and with GMC:, and should work with any others that come up. But
- be warned -- do NOT try using it with RAW:!
-
- The option -I (command line) or INTERLACE (tooltype -- it can be just the word
- INTERLACE, you don't need INTERLACE=YES or anything like that), then it will
- open an interlaced screen. With this you can see 50 lines of text (using an 8
- point font) instead of the usual 25, or if you are a PAL user, 64 instead of 32.
- If you have set your system so that you have an overscanned workbench, then
- CLImax's screen will be similarly oversized and you may get even more lines of
- text. With interlace, you might want to use a font taller than size 8 to make
- the text more readable; with Topaz 11 you get at least 36 lines of text on a
- non-overscanned NTSC display.
-
- The option -E, or the tooltype TOPAZ11, causes CLImax to use the Topaz 11 font
- in its window instead of the system default font. Usually this would be used
- with an interlaced screen. Note: this option does not work when using the GMC
- handler, at least as of v9.6 of GMC.
-
- The option -G, or the tooltype GREEN, causes it to use a color palette of black
- text on a greenish background. Normally it uses the same colors as the
- workbench. These colors are chosen to minimize visible flicker when using an
- interlaced screen on a non-flicker-fixed monitor, particularly a 1080 or 1084.
-
- The option -P, or the tooltype PRODUCTIVITY, causes it to use a productivity
- mode screen. This requires both the ECS Denise chip on your motherboard, and
- AmigaDOS 2.0 or newer. The screen will be 640 by 480 pixels, and Workbench
- overscan is ignored, except for one weird little "feature" I put in: since
- switching from a NTSC screen to a productivity screen, at least on my system
- (A3000 with C= 1930 monitor), causes the image to shift to the left on the
- monitor, I made this option shift CLImax's screen as far to the right as the
- Workbench's overscan allows. If that's not appropriate for your system, just
- use the mouse to drag it back to the left. If you hate this feature, tell me.
-
- The option -1, or the tooltype TWOCOLOR, causes it to open a one-bitplane screen
- using only two colors, instead of the usual two-bitplane screen with four
- colors. This causes vertical scrolling to go twice as fast.
-
- The option -B, or the tooltype INACTIVE, causes the screen to be opened behind
- all other screens, with the window initially inactive. Thus, you will not see
- that CLImax has started up, until you move any screen(s) in front of it aside,
- and see it there waiting for you.
-
- The option -S, or the tooltype SMARTREFRESH, causes it to open a "smart refresh"
- window under AmigaDOS 2.x, which makes the snip-text-with-the-mouse feature of
- the 2.x console device unusable. The window is always smart refresh under 1.3
- and older. I put this in because GMC (as of v9.6) is as yet unable to properly
- handle a simple refresh window -- any other window that is opened on top of it
- will erase all the text underneath. And if you use ConMan with a simple refresh
- window, then any program that switches the handler to raw mode, or from raw mode
- to normal mode, will cause an annoying display glitch as the screen is quickly
- erased and redrawn a couple of times.
-
- The option -W, or the tooltype WAITRETURN, is ignored except when the DO option
- has been used to make CLImax run just one command instead of creating an
- interactive session. When DO is used, this option causes CLImax to prompt the
- user to press return before it exits and closes the screen. Otherwise CLImax
- closes down as soon as the program being run finishes. The -W option or the
- WAITRETURN tooltype may be followed by a number, for example -W10 (no space
- between the W and the number) or WAITRETURN=5. If this number is present, it
- represents a "fail level". If the return code of the command that is run is
- greater than or equal to this number, then CLImax prompts you to press return
- before it exits, otherwise it exits immediately. This feature works only under
- dos 2.0 and newer; under 1.3 the number is ignored. The purpose of this is that
- some commands you would want to run might not give you a chance to see their
- output if there is an error and they exit right away, but you might not want to
- have to press return if the command ran successfully.
-
- CLImax will write out a summary of these options if you give the command "CLImax
- ?" or "CLImax H". It will not open any screen in this case.
-
- To end CLImax when the DO option is not used, just EndCLI as usual, or (under
- dos 2.x) press control-backslash; the screen will be closed when there are no
- windows left on it. If there is still a window from some other program there
- after the console closes, it will check once per second to see when it leaves,
- and close when it's gone. The console will stay open if some background process
- started with a Run command still has a dublicate file handle on it, just like
- regular NewCLI.
-
- When CLImax starts up, it looks for the file S:Shell-Startup and if it exists,
- executes it before giving the first prompt. Typically this file contains a
- bunch of Alias commands, among other things. To specify a different file, use
- the FROM option. Either end the command line with "FROM filename", or use the
- tooltype FROM=filename. If you use FROM without any filename, then it will not
- look for any file to execute. "FROM" must be AFTER all other options on the
- command line. Example: "CLImax -ie newcon: from ram:Shell-Startup" causes
- CLImax to execute RAM:Shell-Startup instead of S:Shell-Startup before giving a
- prompt, after opening a NEWCON: window using the Topaz 11 font on an interlaced
- screen.
-
- To make CLImax run just one command and then exit, use the DO option. It is
- used exactly like FROM, except that you put a complete command after it instead
- of a filename. You cannot use both FROM and DO on the command line, and if you
- use both tooltypes, the FROM one is ignored. The tooltype COMMAND can be used
- as a synonym of DO, but only DO works in a CLI command. On the command line,
- you can put more than one command after DO just as you can with a Run command --
- by ending the line with a plus sign and then putting the next command on a
- separate line. Here is an example of how that would look in a CLI session:
-
- 1> climax do type my-text-file +
- echo "*N --- end of file" +
- wait 4
-
- That example would open a CLImax screen, type a file onto it, add the line
- " --- end of file" after a couple of blank lines at the bottom, wait four
- seconds, and then close the screen. Note that the combined length of all the
- commands must be no more than about 245 characters.
-
- Under 1.3 and older, it is possible that a failed DO command might cause the
- CLImax running it to leave you with an interactive shell prompt. This will
- happen if it encounters a command it can't find, or if a command fails with an
- error code higher than the process's "fail level", which defaults to 10. You
- can use the + feature to set the fail level with a FailAt command, like this:
-
- 1> climax do failat 999 +
- cc arfarf.c
-
- This will prevent CLImax from dumping you to a shell prompt if the cc command
- fails with too high a return code. Again, this does not happen under dos 2.0
- and newer.
-
- There is one possible hassle with running a DO command, depending on the console
- handler you use ... you may be unable to interrupt it with control-C. When the
- DO option is used, control-C does not work if you use NEWCON or GMC or the
- standard CON under dos 1.3 and older. It does work with ConMan and with the 2.0
- and newer standard CON.
-
- The DO option can be used to "encapsulate" another program so that it uses a
- CLImax screen. One program that I like to treat this way is More, used for
- viewing text files. I still prefer it to other programs like MuchMore, because
- it's simple and quick -- smooth scrolling is a waste of time, in my opinion.
- But More by itself does not open its own screen ... unless you use it with
- CLImax. One can use an alias to create a text viewing command called, for
- instance, View: "alias View climax -w5 do more []". This not only puts More on
- its own borderless screen, but lets the original CLI window where the View
- command was given give a fresh prompt without waiting for More to exit. The -w5
- option makes it wait for you to press return if it exits with an error message
- (such as when it can't find the file), but quit immediately if More displayed
- the file successfully.
-
- From Workbench, this "encapsulation" can be done with a special feature, which
- uses a tooltype called ARGINSERT. What you put after that tooltype is one
- character, usually some punctuation mark. For instance, "ARGINSERT=@". When
- this tooltype is used and a DO tooltype is also used, it searches the command
- after DO= for the character after ARGINSERT, and at that point, substitutes into
- the command the name of a file passed as a Workbench argument. What this means
- is that you can click on a CLImax icon that has these tooltypes, then shift-
- double-click on a file, and the command in the DO tooltype will act on that
- file. For example, to use More in this way from the Workbench, one would create
- an icon named (for example) View, which is attached to a copy of the CLImax
- program, and give it these tooltypes: "ARGINSERT=@" and "DO=More @". (You
- would also want to use WAITRETURN=5, if you have 2.0 or newer.) When you use
- shift-clicking to give it a Workbench argument, the @ is replaced with the name
- of the file you used, so that the command that gets run is "More filename"
- instead of "More @". When this is done, the program is run with its current
- directory set to the directory that the arg file (the one substituted for @) was
- found in. If you double-click it with no arg, the @ is removed. If you give it
- two or more extra args, it only uses the first one. This works most efficiently
- if More is made resident.
-
- What I actually like to do is to name this copy of CLImax "SYS:Utilities/More"
- so that icons which have that as their default tool will be displayed by it when
- double clicked. The actual More program is made resident as "Real-More", and
- the More icon's tooltypes include "DO=Real-More @", and my shell aliases include
- "alias V climax -isw5 do real-more []". I also use this icon as an AppIcon by
- means of Stefan Becker's ToolManager. This allows me to simply drag the icon of
- a text file onto a More icon on the Workbench backdrop, to view it with More run
- under CLImax. (I use another AppIcon to feed files to my text editor through
- ARexx, using my FRX hack.)
-
- When the current directory is not set by the ARGINSERT feature, the current
- directory can be set from Workbench with a tooltype "CD". When run from a CLI,
- the current directory is always the same as it was where the command was given.
- When you use the CD tooltype, the resulting CLI will show its current directory,
- if you use %S in the prompt, to be an exact copy of the string you put after
- "CD=". For instance, if you use "CD=sys:trashcan", then the prompt would be
- something like "1.sys:trashcan> " instead of the "1.Workbench1.3:Trashcan> " (or
- whatever) that you would get if you gave an actual CD command. So one should
- give the full correct pathname after CD= if you care about such appearences, or
- if you don't want to give a full pathname, the command CD "" (that is, CD to
- nothing in quotes) can be used (in S:Shell-Startup perhaps) to convert the
- prompt to the full correct pathname.
-
- If you leave out the CD= tooltype, or name a nonexistent directory after CD=, a
- CLImax started from Workbench will have no current directory. The string in the
- prompt will be "SYS:", but the effective CD will be the drive you booted from,
- NOT the current definition of SYS:. Note that many standard commands like Dir
- and Copy don't like to have a null current directory, at least under 1.3. They
- attempt to read the boot drive for no reason, and can fail if there's no disk in
- it, even if everything they're operating on is explicitly elsewhere. Like, the
- command "dir ram:" will fail if there's no disk in the boot drive. This is a
- bug. So if you ever create new CLI's that tell you "SYS:" when you ask what the
- current directory is, for instance by using PopCLI or DMouse, you should make
- use of my hack FixCLI, which will give a new CLI a path and a current directory,
- if it has none already. Just go "FixCLI dirname" in the Shell-Startup script.
- Make FixCLI resident (it's real small) if you use it this way.
-
- (Note: It is possible to set CD= to a file instead of a directory. Some
- programs will bomb when run from such a CLI.)
-
- There is one more tooltype option, for compatibility with older versions of
- CLImax. It is called OPTION, and the string after it consists of options that
- you would put after a dash on the CLI command line, like I for interlace, 1 for
- one bitplane, W5 for wait for return if the DO command's fail level is 5 or
- more. This can be more convenient than entering several tooltypes.
-
- A CLImax started from the Workbench will attempt to copy the command path of the
- Workbench process. If there is none, it will look at other CLI processes and
- copy what it finds. One started from a CLI will copy the path of the CLI it was
- started from.
-
- In the upper right corner of the screen you'll see (parts of) the one or two
- (depending on your AmigaDOS version) screen depth gadgets. The screen is
- slightly overscanned vertically even when your Workbench is not, and so (though
- you can't see it) there is a piece of screen title bar above the top of the
- window, which you can use to slide the screen vertically, or to click the depth
- gadget(s). With an interlaced screen the whole title bar is there in addition
- to the 400 line window; with a non-interlaced screen the title bar and depth
- gadgets are only partially uncovered (just four scan lines). I know it sounds
- unaesthetic, but it's not really so bad. Because of the overscan, it helps to
- use Preferences settings in which the workbench screen is moved slightly upwards
- of center. If the workbench is already overscanned, CLImax will not be any
- larger than the workbench screen is.
-
- Some of the programs you run will create windows and stuff on the Workbench
- screen, and will seem to be doing nothing if you just look at the CLImax screen.
- One program that is very useful with CLImax for switching screens is wKeys by
- Davide Cervone, available on Fish disk 128. Or you might prefer Matt Dillon's
- DMouse or a similar mouse enhancer. Personally, I use a modified DMouse with
- wKeys-like screen flipping features, and a couple of other improvements. If
- anybody wants a copy of this DMouse (called DRat) I can give you one, but I'm
- not mass-distributing it because Matt Dillon doesn't like it.
-
- For CLImax to work under dos 1.3 and older, the Run program, and probably the
- Execute program, must be available in C: or made resident. Run must be on disk
- if you are using a version of AmigaDOS earlier than 1.3.2 -- that's the first
- version in which the Execute() function knows to look for Run in the resident
- list. If you are using 1.3 and don't have the 1.3.2 version of SetPatch, get
- it. It makes anything that uses Execute(), including CLImax, a lot faster and
- more efficient, when Run is resident. Make Run resident even if you don't make
- anything else resident. Under 2.0, Run is in the ROM so this is no problem, but
- it still requires the Execute program to be available in most cases. I suggest
- making it resident in your startup-sequence.
-
- It's possible that if you have CLImax and LoadWB both in your startup-
- sequence (I do) that you might end up facing an inactive CLImax window which
- ignores your typing because the workbench backdrop activated the moment the
- initial CLI window vanished. Try readjusting positions of these things in
- startup-sequence; especially try putting CLImax at the very end.
-
- CLImax is in the public domain. Feedback is appreciated. If you want to,
- and this hack is useful to you, you can send me something nice in return. Heck,
- I'd just like to hear if anybody benefits from using it. Earlier versions of
- this program seemed to be a flop as far as public acclaim goes, but they only
- worked with ConMan and didn't have a lot of the better features yet.
-
- no email address, but try Paul Kienitz
- these northern California BBSes: 6430 San Pablo ave.
- Winners Circle 510-845-4812 Oakland, CA, 94608
- Triple-A 510-528-2867 USA
- The Mission 415-967-2021
- FAUG 415-595-2479
- (the first two are in the east bay, the last two are in
- silicon valley - you'll get slower response with those)
-